<!--
 * @Description: 登录
 * @Author: HuiSir<273250950@qq.com>
 * @Date: 2021-09-07 14:52:06
 * @LastEditTime: 2025-08-12 11:33:15
-->
<template>
  <div class="login">
    <a href="/" class="logo">
      <img src="@/assets/images/logo.svg" :alt="project.siteTitle" />
    </a>
    <div class="container">
      <div class="login-slogan">
        <h2>一站在手，天下你有</h2>
        <p>想开启财富的大门，想要提升竞争力？来就对了！</p>
      </div>
      <div class="login-box">
        <h2>登录</h2>
        <h5>账号密码登录</h5>
        <LoginForm ref="loginFormRef" />
      </div>
    </div>
    <div class="footer">
      <p>©2021-{{ thisYear }} {{ project.siteTitle }}. All rights reserved.</p>
      <p>
        <a href="https://beian.miit.gov.cn/" target="_blank"
          >京ICP备88888888号</a
        >
        <a href="" target="_blank">用户协议</a>
        <a href="" target="_blank">隐私政策</a>
      </p>
    </div>
  </div>
</template>

<script lang="ts" setup>
import { project } from "@/init/config";
import LoginForm from "@/components/LoginForm/index.vue";

// 配置项
defineOptions({ name: "MyLogin" });

const thisYear = new Date().getFullYear();
</script>

<style scoped lang="scss">
.login {
  width: 100%;
  height: 100vh;
  position: relative;
  background-image: url(../../assets/images/login_bg.jpg);
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  display: flex;
  justify-content: center;
  align-items: center;

  // &::before {
  //     content: '';
  //     position: absolute;
  //     left: 0;
  //     right: 0;
  //     bottom: 0;
  //     top: 0;
  //     background-color: rgba(53, 48, 48, 0.7);
  // }

  .logo {
    position: absolute;
    left: 4vw;
    top: 35px;
    height: 30px;

    img {
      height: 100%;
      width: auto;
    }
  }

  .container {
    width: 80vw;
    display: flex;
    justify-content: space-around;
    align-items: center;
    transform: translateY(-6vh);

    .login-slogan {
      color: #fff;
      width: 360px;
      white-space: nowrap;

      h2 {
        font-size: 32px;
        font-weight: bold;
        line-height: 40px;
        margin: 0;
      }

      p {
        font-size: 16px;
        line-height: 24px;
        margin-top: 14px;
      }
    }

    .login-box {
      width: 360px;
      background: #fff;
      border-radius: 10px;
      text-align: left;
      padding: 40px 50px;
      position: relative;

      h5 {
        margin: 10px 0 16px 0;
      }
    }
  }

  .footer {
    position: fixed;
    width: 100%;
    bottom: 0;
    padding: 30px 4vw;
    text-align: left;
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
    line-height: 18px;

    a {
      color: inherit;
      margin-right: 6px;
    }
  }

  @media screen and (max-width: 920px) {
    .container .login-slogan {
      display: none;
    }

    .footer {
      text-align: center;
    }
  }
}
</style>
